import os
import cv2

# 渲染结果
total_frames = 30
output_dir = "./output"

# 格式
image_fmt = "jpg"

def show_images():
    img = None
    for i in range(total_frames):
        save_name = "{name}.{fmt}".format(name=i, fmt=image_fmt)
        save_path = os.path.join(output_dir, save_name)
        img = cv2.imread(save_path, cv2.IMREAD_ANYCOLOR)
        cv2.imshow("Img", img)
        cv2.waitKey(25)

if __name__ == "__main__":
    while True:
        show_images()